home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2779 < prev    next >
Encoding:
Text File  |  1996-08-06  |  2.7 KB  |  82 lines

  1. Path: news.ua.es!usenet
  2. From: Gregorio Ortiz <a00813.@eps.ua.es>
  3. Newsgroups: comp.lang.c++
  4. Subject: Using multiple functions
  5. Date: Fri, 19 Jan 1996 08:36:51 +0100
  6. Organization: Universidad de Alicante
  7. Message-ID: <30FF4A13.5488F069@eps.ua.es>
  8. NNTP-Posting-Host: s04.eps.ua.es
  9. Mime-Version: 1.0
  10. Content-Type: multipart/mixed;
  11.     boundary="---------------------------3700897086577320701235075530"
  12. X-Mailer: Mozilla 2.0b3 (X11; I; Linux 1.1.59 i486)
  13. CC: drackull@datasync.com
  14.  
  15. This is a multi-part message in MIME format.
  16.  
  17. -----------------------------3700897086577320701235075530
  18. Content-Type: text/plain; charset=us-ascii
  19. Content-Transfer-Encoding: 7bit
  20.  
  21. Hello,
  22.  
  23. -----------------------------3700897086577320701235075530
  24. Content-Type: message/rfc822
  25. Content-Transfer-Encoding: 7bit
  26. Content-Disposition: inline
  27.  
  28. Path: news.ua.es!power.ci.uv.es!news.rediris.es!news.uoregon.edu!news.orst.edu!news.cs.indiana.edu!umn.edu!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!news.datasync.com!news
  29. From: drackull@datasync.com (Eddy B Drackull)
  30. Newsgroups: comp.lang.c++
  31. Subject: Re: Using multiple functions in one file
  32. Date: 13 Jan 1996 06:06:57 GMT
  33. Organization: RK Inspection Service Inc.
  34. Lines: 39
  35. Message-ID: <4d7i61$i3e@osh2.datasync.com>
  36. References: <DL00rI.HFr@cunews.carleton.ca>
  37. NNTP-Posting-Host: os-ppp25.datasync.com
  38. X-Newsreader: WinVN 0.92.6
  39.  
  40. In article <DL00rI.HFr@cunews.carleton.ca>, abelo@chat.carleton.ca (Andrew Belo) says:
  41. >
  42. >
  43. >I have written an example program out of a book and it keeps giving me an
  44. >error that says "Call to undefined function 'butler' in function main()" 
  45. >I am using Borland C++ for Dos, Win and Win 32 Version 4.5.
  46. >
  47. >The book is called C: Step by Step, and the program is as follows.
  48.  
  49. try this
  50.  
  51. /* two_func.c -- a program using two functions in one file  */
  52. #include <stdio.h>
  53.  
  54. void butler(void);/*declar a function befor using it*/
  55.                            /*you could switch the order of butler() and main and it will also work*/
  56. main()
  57. {
  58.         printf("I will summon the butler function. \n");
  59.         butler();
  60.         printf("Yes. Bring me some tea and floppy disks.\n");  
  61. }
  62. butler()
  63. {
  64. printf("You rang, sir? \n");
  65. }
  66.  
  67. >----------------------------------------------------------------------------
  68. >Andrew Belo           |  WARNING: Yes this message has spelling mistakes but 
  69. >1st Year Computer Sci |  learn to live with it!!!!!!!!
  70. >Carleton University   ------------------------------------------------------  
  71. >Email address: abelo@chat.carleton.ca
  72. >               ai806@FreeNet.Carleton.CA
  73. >Home Page:     chat.carleton.ca/~abelo
  74. >----------------------------------------------------------------------
  75. >
  76.  
  77.  
  78. bye drackull
  79.  
  80. -----------------------------3700897086577320701235075530--
  81.  
  82.